package com.demo.servlet.entity;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Person {
    private String name;
    private Date birthday;
    private int age;
    private double salary;
    private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");

    public Person() {
    }

    public Person(String name, Date birthday, int age, double salary) {
        this.name = name;
        this.birthday = birthday;
        this.age = age;
        this.salary = salary;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBirthday() {
        return format.format(this.birthday);
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public int getAge() {
        return this.age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return this.salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
